package com.example.a1018;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
    String username;
    String password;
    String age;
    String sex;
    private TextView tvInfo;
    private Button button3;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        tvInfo=(TextView)findViewById(R.id.tvInfo);
        button3=(Button)findViewById(R.id.button3);
        if (getIntent()!=null){
            username=getIntent().getStringExtra("username");
            password=getIntent().getStringExtra("password");
            age=getIntent().getStringExtra("age");
            sex=getIntent().getStringExtra("sex");
            tvInfo.setText(getText(R.string.yhm)+username+"\n"+
            getText(R.string.mm)+password+"\n"+
                    getText(R.string.nl)+age+"\n"+
                    getText(R.string.xb)+sex+"\n");


        }

    }


    public void tcdl(View view) {
        finish();
    }
}